<?php
class NewsModel extends Model{
	//增
	public function add_news(){
		return M("news","","DB_MEETING")->add($_POST);
	}
	//删
	public function del_news($nid){
		return M("news","","DB_MEETING")->where("nid=".$nid)->delete();
    }
	//改
	public function update_news(){ 
		return M("news","","DB_MEETING")->where("nid={$_POST['nid']}")->save($_POST);
	}
	//查
    public function get_news_count(){
		return M("news","","DB_MEETING")->count();
    }
	public function get_news($nid){
		return M("news","","DB_MEETING")->where("nid=".$nid)->find();
	}
	public function get_newss($seach){
		return pageing('news',10,'',$seach,'','1=1','title');	
	}

}

?>
